﻿using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;

namespace WindowsFormsApp1.Docking
{
    public class ToolBoxWindow : DockContent
    {
        public ToolBoxWindow()
        {
            Text = "工具箱";
            TabText = "工具箱";
            var tree = new TreeView
            {
                Dock = DockStyle.Fill,
                BackColor = System.Drawing.Color.FromArgb(37, 37, 38),
                ForeColor = System.Drawing.Color.White,
                BorderStyle = BorderStyle.None
            };

            tree.Nodes.Add("公共控件");
            tree.Nodes[0].Nodes.AddRange(new[] {
                new TreeNode("按钮"),
                new TreeNode("文本框"),
                new TreeNode("标签")
            });

            Controls.Add(tree);
        }
    }
}
